﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;

namespace BPM.Web.Shared.Data;

/// <summary>
/// 请求日志参数
/// </summary>
public partial class OpLogOutput : BaseVM
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [DisplayName("业务号")]
    [Required(ErrorMessage = "业务号不能为空")]
    [JsonPropertyName("id")]
    public long Id { get; set; }

    /// <summary>
    /// 名称
    /// </summary>
    [DisplayName("名称")]
    [JsonPropertyName("name")]
    public string? Name { get; set; }

    [DisplayName("成功")]
    [JsonPropertyName("success")]
    public YesOrNot Success { get; set; }

    /// <summary>
    /// 具体消息
    /// </summary>
    [DisplayName("具体消息")]
    [JsonPropertyName("message")]
    public string? Message { get; set; }

    /// <summary>
    /// ip
    /// </summary>
    [DisplayName("IP")]
    [JsonPropertyName("ip")]
    public string? Ip { get; set; }

    /// <summary>
    /// 地址
    /// </summary>
    [DisplayName("地址")]
    [JsonPropertyName("location")]
    public string? Location { get; set; }

    /// <summary>
    /// 浏览器
    /// </summary>
    [DisplayName("浏览器")]
    [JsonPropertyName("browser")]
    public string? Browser { get; set; }

    /// <summary>
    /// 操作系统
    /// </summary>
    [DisplayName("操作系统")]
    [JsonPropertyName("os")]
    public string? Os { get; set; }

    /// <summary>
    /// 请求地址
    /// </summary>
    [DisplayName("请求地址")]
    [JsonPropertyName("url")]
    public string? Url { get; set; }

    /// <summary>
    /// 类名称
    /// </summary>
    [DisplayName("类名称")]
    [JsonPropertyName("className")]
    public string? ClassName { get; set; }

    /// <summary>
    /// 方法名称
    /// </summary>
    [DisplayName("方法名称")]
    [JsonPropertyName("methodName")]
    public string? MethodName { get; set; }

    /// <summary>
    /// 请求方式（GET POST PUT DELETE)
    /// </summary>
    [DisplayName("请求方式")]
    [JsonPropertyName("reqMethod")]
    public string? ReqMethod { get; set; }

    /// <summary>
    /// 请求参数
    /// </summary>
    [DisplayName("请求参数")]
    [JsonPropertyName("param")]
    public string? Param { get; set; }

    /// <summary>
    /// 返回结果
    /// </summary>
    [DisplayName("返回结果")]
    [JsonPropertyName("result")]
    public string? Result { get; set; }

    /// <summary>
    /// 耗时（毫秒）
    /// </summary>
    [DisplayName("耗时（毫秒）")]
    [JsonPropertyName("elapsedTime")]
    public long ElapsedTime { get; set; }

    /// <summary>
    /// 操作时间
    /// </summary>
    [DisplayName("操作时间")]
    [JsonPropertyName("opTime")]
    public DateTimeOffset? OpTime { get; set; }

    /// <summary>
    /// 操作人
    /// </summary>
    [DisplayName("操作人")]
    [JsonPropertyName("account")]
    public string? Account { get; set; }

}
